home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / squid.vim < prev    next >
Encoding:
Text File  |  2001-05-10  |  4.7 KB  |  119 lines

  1. " Vim syntax file
  2. " Language:    Squid config file
  3. " Maintainer:    Klaus Muth <muth@hagos.de>
  4. " Last Change:    2001 May 09
  5. " URL:        http://unitopia.uni-stuttgart.de/~monty/vim/syntax/squid.vim
  6.  
  7.  
  8. " For version 5.x: Clear all syntax items
  9. " For version 6.x: Quit when a syntax file was already loaded
  10. if version < 600
  11.   syntax clear
  12. elseif exists("b:current_syntax")
  13.   finish
  14. endif
  15.  
  16. " squid.conf syntax seems to be case insensitive
  17. syn case ignore
  18.  
  19. syn keyword    squidTodo    contained TODO
  20. syn match    squidComment    "#.*$" contains=squidTodo,squidTag
  21. syn match    squidTag    contained "TAG: .*$"
  22.  
  23. " Lots & lots of Keywords!
  24. syn keyword    squidConf    http_port icp_port mcast_groups
  25. syn keyword    squidConf    tcp_incoming_address tcp_outgoing_address
  26. syn keyword    squidConf    udp_incoming_address udp_outgoing_address
  27. syn keyword    squidConf    cache_host cache_host_domain
  28. syn keyword    squidConf    neighbor_type_domain inside_firewall
  29. syn keyword    squidConf    local_domain local_ip firewall_ip
  30. syn keyword    squidConf    single_parent_bypass source_ping
  31. syn keyword    squidConf    neighbor_timeout hierarchy_stoplist
  32. syn keyword    squidConf    cache_stoplist cache_stoplist_pattern
  33. syn keyword    squidConf    cache_mem cache_swap cache_swap_low
  34. syn keyword    squidConf    cache_swap_high cache_mem_low
  35. syn keyword    squidConf    cache_mem_high maximum_object_size
  36. syn keyword    squidConf    ipcache_size ipcache_low ipcache_high
  37. syn keyword    squidConf    cache_dir cache_access_log cache_log
  38. syn keyword    squidConf    cache_store_log cache_swap_log
  39. syn keyword    squidConf    emulate_httpd_log log_mime_hdrs
  40. syn keyword    squidConf    useragent_log pid_filename
  41. syn keyword    squidConf    debug_options ident_lookup log_fqdn
  42. syn keyword    squidConf    client_netmask ftpget_program
  43. syn keyword    squidConf    ftpget_options ftp_user cache_dns_program
  44. syn keyword    squidConf    dns_children dns_defnames unlinkd_program
  45. syn keyword    squidConf    pinger_program redirect_program
  46. syn keyword    squidConf    redirect_children wais_relay request_size
  47. syn keyword    squidConf    refresh_pattern reference_age reference_age
  48. syn keyword    squidConf    quick_abort quick_abort negative_ttl
  49. syn keyword    squidConf    positive_dns_ttl negative_dns_ttl
  50. syn keyword    squidConf    connect_timeout read_timeout client_lifetime
  51. syn keyword    squidConf    shutdown_lifetime acl http_access miss_access
  52. syn keyword    squidConf    cache_host_acl cache_mgr cache_effective_user
  53. syn keyword    squidConf    visible_hostname cache_announce announce_to
  54. syn keyword    squidConf    httpd_accel httpd_accel_with_proxy
  55. syn keyword    squidConf    httpd_accel_uses_host_header dns_testnames
  56. syn keyword    squidConf    logfile_rotate append_domain
  57. syn keyword    squidConf    tcp_recv_bufsize ssl_proxy passthrough_proxy
  58. syn keyword    squidConf    proxy_auth err_html_text udp_hit_obj
  59. syn keyword    squidConf    udp_hit_obj_size memory_pools forwarded_for
  60. syn keyword    squidConf    log_icp_queries minimum_direct_hops
  61. syn keyword    squidConf    swap_level1_dirs
  62. syn keyword    squidConf    swap_level2_dirs store_avg_object_size
  63. syn keyword    squidConf    store_objects_per_bucket http_anonymizer
  64. syn keyword    squidConf    fake_user_agent client_db
  65. syn keyword    squidConf    netdb_low netdb_high netdb_ping_rate
  66. syn keyword    squidConf    netdb_ping_period query_icmp
  67. syn keyword    squidConf    icp_hit_stale reload_into_ims
  68. syn keyword    squidConf    cachemgr_passwd
  69.  
  70. syn keyword    squidOpt    proxy-only weight ttl no-query default
  71. syn keyword    squidOpt    round-robin multicast-responder
  72. syn keyword    squidOpt    on off all deny allow
  73.  
  74. " Security Actions for cachemgr_passwd
  75. syn keyword    squidAction    shutdown info parameter server_list
  76. syn keyword    squidAction    client_list
  77. syn match    squidAction    "stats/\(objects\|vm_objects\|utilization\|ipcache\|fqdncache\|dns\|redirector\|io\|reply_headers\|filedescriptors\|netdb\)"
  78. syn match    squidAction    "log\(/\(status\|enable\|disable\|clear\)\)\="
  79. syn match    squidAction    "squid\.conf"
  80.  
  81. " Keywords for the acl-config
  82. syn keyword    squidAcl    url_regexp urlpath_regexp port proto
  83. syn keyword    squidAcl    method browser user src
  84.  
  85. syn match    squidNumber    "\<\d\+\>"
  86. syn match    squidIP        "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>"
  87.  
  88. " All config is in one line, so this has to be sufficient
  89. " Make it fast like hell :)
  90. syn sync minlines=3
  91.  
  92. " Define the default highlighting.
  93. " For version 5.7 and earlier: only when not done already
  94. " For version 5.8 and later: only when an item doesn't have highlighting yet
  95. if version >= 508 || !exists("did_squid_syntax_inits")
  96.   if version < 508
  97.     let did_squid_syntax_inits = 1
  98.     command -nargs=+ HiLink hi link <args>
  99.   else
  100.     command -nargs=+ HiLink hi def link <args>
  101.   endif
  102.  
  103.   HiLink squidTodo    Todo
  104.   HiLink squidComment    Comment
  105.   HiLink squidTag    Special
  106.   HiLink squidConf    Keyword
  107.   HiLink squidOpt    Constant
  108.   HiLink squidAction    String
  109.   HiLink squidNumber    Number
  110.   HiLink squidIP    Number
  111.   HiLink squidAcl    Keyword
  112.  
  113.   delcommand HiLink
  114. endif
  115.  
  116. let b:current_syntax = "squid"
  117.  
  118. " vim: ts=8
  119.